home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Freeware 2002 November
/
SGI Freeware 2002 November - Disc 3.iso
/
relnotes
/
shared
/
js
/
nav_functions.js
next >
Wrap
Text File
|
2002-10-07
|
6KB
|
137 lines
// Drop Down Navigation Code, March 13, 2002
window.onerror = null;
window.defaultStatus = '';
var initialized = false;
var menus = new Array();
var menuovers = new Array();
var menustatus = new Array();
// initializes the menus into an array
function init() {
for (var i=0;i<=5;i++) {
menustatus[i] = false;
if(isFour) {
if (nav4) {
menus[i] = document['menu'+i];
menuovers[i] = document['menu'+i+'overs'];
if (i < 5) menuovers[i].onmouseout = menuhider;
} else {
menus[i] = (document.getElementById)?document.getElementById('menu'+i).style:document.all['menu'+i].style;
var tmnov = (document.getElementById)?document.getElementById('menu'+i+'overs'):document.all['menu'+i+'overs'];
menuovers[i] = tmnov.style;
tmnov.onmouseout = menuhider;
}
}
}
initialized = true;
}
// Sets the requested menus visibility
function change(Num,Image,No) {
if (initialized) {
if (No && !menustatus[Num]) clearmenus();
if (Image) {
document['imgmenu'+Num].src = self[Image + No].src;
if (!Num) document['imgcrnr'].src = self["nav_prd_crnr" + No].src // Why is the corner seperate again?
}
if (isFour) {
menus[Num].visibility = (No) ? 'visible' : 'hidden';
menus[Num].zIndex = (No) ? '300' : '100';
menuovers[Num].visibility = (No) ? 'visible' : 'hidden';
menuovers[Num].zIndex = (No) ? '310' : '110';
}
menustatus[Num] = No;
}
}
// Hilights the selected menu item
function menuItem(imgname, dn, on) {
if (isFour) {
var liteImage = (on) ? self[imgname + 'over'].src : blank.src;
if (nav4) menuovers[dn].document[imgname].src = liteImage;
else document[imgname].src = liteImage;
}
}
// Makes the menu invisible when the mouse leaves it
function menuhider(evnt) {
if (initialized) {
if (ie) { if (window.event.toElement.className != 'menu') clearmenus();}
else if (evnt.relatedTarget) { if (evnt.relatedTarget.className != 'menu') clearmenus();}
else if (nav4) clearmenus();
}
}
// Select box pull down redirection mechanism
function goSelect(daform) {
top.location=daform.options[daform.selectedIndex].value;
}
// RTP PopUp window
function RateThisPage() {
var winl = ((screen.width - 325) / (9.5));
var wint = (screen.height - 300) / (2);
rateWinProps = 'top='+wint+',left='+winl+',height=300,width=325,scrollbars=no,noresizable'
var rateThisWindow=window.open('/rate/index.html','rateWindow',rateWinProps);
rateThisWindow.opener=self;
}
// Products
var nav_prd_crnr0=new Image(); nav_prd_crnr0.src="images/nav/nav_prod_corner0.gif";
var nav_prd_crnr1=new Image(); nav_prd_crnr1.src="images/nav/nav_prod_corner1.gif";
var nav_prd0=new Image(); nav_prd0.src="images/nav/nav_prod0.gif";
var nav_prd1=new Image(); nav_prd1.src="images/nav/nav_prod1.gif";
var serversover=new Image(); serversover.src="images/nav/drop_prod_servers.gif";
var workstationsover=new Image(); workstationsover.src="images/nav/drop_prod_workstations.gif";
var softover=new Image(); softover.src="images/nav/drop_prod_soft.gif";
var vissysover=new Image(); vissysover.src="images/nav/drop_prod_vissys.gif";
var storageover=new Image(); storageover.src="images/nav/drop_prod_storage.gif";
var remanover=new Image(); remanover.src="images/nav/drop_prod_reman.gif";
var peripheralsover=new Image(); peripheralsover.src="images/nav/drop_prod_peripherals.gif";
// Industries
var nav_ind0=new Image(); nav_ind0.src="images/nav/nav_ind0.gif";
var nav_ind1=new Image(); nav_ind1.src="images/nav/nav_ind1.gif";
var energyover=new Image(); energyover.src="images/nav/drop_ind_energy.gif";
var manover=new Image(); manover.src="images/nav/drop_ind_man.gif";
var mediaover=new Image(); mediaover.src="images/nav/drop_ind_media.gif";
var scienceover=new Image(); scienceover.src="images/nav/drop_ind_science.gif";
var govdefover=new Image(); govdefover.src="images/nav/drop_ind_govdef.gif";
// Developers
var nav_dev0=new Image(); nav_dev0.src="images/nav/nav_dev0.gif";
var nav_dev1=new Image(); nav_dev1.src="images/nav/nav_dev1.gif";
var devprogover=new Image(); devprogover.src="images/nav/drop_dev_devprog.gif";
var busdevover=new Image(); busdevover.src="images/nav/drop_dev_busdev.gif";
var devtoolsover=new Image(); devtoolsover.src="images/nav/drop_dev_devtools.gif";
var irixover=new Image(); irixover.src="images/nav/drop_dev_irix.gif";
var ossover=new Image(); ossover.src="images/nav/drop_dev_oss.gif";
// Support Rollover
var nav_srv0=new Image(); nav_srv0.src="images/nav/nav_support0.gif";
var nav_srv1=new Image(); nav_srv1.src="images/nav/nav_support1.gif";
var profover=new Image(); profover.src="images/nav/drop_supp_prof.gif";
var prdvtyover=new Image(); prdvtyover.src="images/nav/drop_supp_prdvty.gif";
var ortover=new Image(); ortover.src="images/nav/drop_supp_ort.gif";
var eduover=new Image(); eduover.src="images/nav/drop_supp_edu.gif";
var onlineover=new Image(); onlineover.src="images/nav/drop_supp_online.gif";
// Fun Rollover
var nav_fun0=new Image(); nav_fun0.src="images/nav/nav_fun0.gif";
var nav_fun1=new Image(); nav_fun1.src="images/nav/nav_fun1.gif";
var gamesover=new Image(); gamesover.src="images/nav/drop_fun_games.gif";
var webdevover=new Image(); webdevover.src="images/nav/drop_fun_webdev.gif";
var softdevover=new Image(); softdevover.src="images/nav/drop_fun_softdev.gif";
var graphicsover=new Image(); graphicsover.src="images/nav/drop_fun_graphics.gif";
var sysadminover=new Image(); sysadminover.src="images/nav/drop_fun_sysadmin.gif";
var freewareover=new Image(); freewareover.src="images/nav/drop_fun_freeware.gif";
// Clear GIF
var blank=new Image(); blank.src="images/dots/dot_clear.gif";